package domian;

public enum ResultStatus {
    UPLOAD_SUCCESS(201, "上传成功"),
    COLLECT_SUCCESS(256, "收藏/取消收藏成功"),
    COLLECT_ERROR(257, "收藏/取消收藏失败"),
    TOURIST_LOGIN(301, "用户未登录"),
    UPLOAD_ERROR(401, "上传失败"),
    REGISTER_ERROR(405, "注册失败,用户名已存在"),
    LOGIN_ERROR_USERNAME(501, "用户不存在"),
    LOGIN_ERROR_PASSWORD(502, "密码错误"),
    LOGIN_SUCCESS(503, "登录成功"),
    REGISTER_SUCCESS(504, "注册成功"),
    REGISTER_BASICINFO_SUCCESS(505, "基本信息完善成功"),
    REGISTER_BASICINFO_ERROR(506, "基本信息完善失败"),

    INTEGRAL_CHANGE(601, "用户注册赠送积分"),
    INIEGRAL_CHANGE2(604, "下载资源扣除积分"),
    INIEGRAL_CHANGE3(605, "资源被下载赠送积分"),
    INIEGRAL_CHANGE4(606, "开通会员扣除积分"),
    INIEGRAL_CHANGE5(607, "开通会员赠送积分"),
    INIEGRAL_CHANGE6(608, "评论资源赠送积分"),
    INIEGRAL_CHANGE7(609, "资源被评论赠送积分"),
    INIEGRAL_CHANGE8(610, "上传资源赠送积分"),

    VIP_SUCCESS(611, "vip开通成功"),
    VIP_ERROR(612, "积分不足,vip开通失败"),
    VIP_NO_NEED(613, "已经开通了永久vip,无需再开通"),

    REVIEW_SUCCESS(631, "评论成功"),
    REVIEW_ERROR2(632, "您不能评论自己上传的资源"),
    REVIEW_ERROR3(633, "您已评论该资源,请勿重复评论"),
    REVIEW_ERROR4(634, "您未下载过该资源,无法评论"),

    UPDATE_SUCCESS(602, "信息修改成功"),
    UPDATE_ERROR(603, "信息修改失败"),

    HEAD_PORTRAIT_SUCCESS(701, "头像上传成功"),

    HEAD_PORTRAIT_ERROR(702, "头像上传失败"),

    NO_VIP(886, "不是会员用户"),
    YES_VIP(888, "是会员用户"),

    UPLOAD_SIZE_NO(822, "文件大小超出限制"),
    UPLOAD_CODE_NO(815, "文件上传验证码错误"),
    UPLOAD_CODE_YES(816, "文件上传验证码正确");

    private Integer code;//状态码
    private String msg;//提示信息

    ResultStatus(Integer code) {
        this.code = code;
    }

    ResultStatus(String msg) {
        this.msg = msg;
    }

    ResultStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
